package com.knowledgegraph.zhongyao.service.impl;

import java.util.List;
import java.util.UUID;

import com.knowledgegraph.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.knowledgegraph.zhongyao.mapper.DockerMapper;
import com.knowledgegraph.zhongyao.domain.Docker;
import com.knowledgegraph.zhongyao.service.IDockerService;

/**
 * 医师维护Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-04
 */
@Service
public class DockerServiceImpl implements IDockerService 
{
    @Autowired
    private DockerMapper dockerMapper;

    /**
     * 查询医师维护
     * 
     * @param docKey 医师维护主键
     * @return 医师维护
     */
    @Override
    public Docker selectDockerByDocKey(String docKey)
    {
        return dockerMapper.selectDockerByDocKey(docKey);
    }

    /**
     * 查询医师维护列表
     * 
     * @param docker 医师维护
     * @return 医师维护
     */
    @Override
    public List<Docker> selectDockerList(Docker docker)
    {
        return dockerMapper.selectDockerList(docker);
    }

    /**
     * 新增医师维护
     * 
     * @param docker 医师维护
     * @return 结果
     */
    @Override
    public int insertDocker(Docker docker)
    {
        docker.setDocKey(UUID.randomUUID().toString());
        docker.setCreateTime(DateUtils.getNowDate());
        return dockerMapper.insertDocker(docker);
    }

    /**
     * 修改医师维护
     * 
     * @param docker 医师维护
     * @return 结果
     */
    @Override
    public int updateDocker(Docker docker)
    {
        docker.setUpdateTime(DateUtils.getNowDate());
        return dockerMapper.updateDocker(docker);
    }

    /**
     * 批量删除医师维护
     * 
     * @param docKeys 需要删除的医师维护主键
     * @return 结果
     */
    @Override
    public int deleteDockerByDocKeys(String[] docKeys)
    {
        return dockerMapper.deleteDockerByDocKeys(docKeys);
    }

    /**
     * 删除医师维护信息
     * 
     * @param docKey 医师维护主键
     * @return 结果
     */
    @Override
    public int deleteDockerByDocKey(String docKey)
    {
        return dockerMapper.deleteDockerByDocKey(docKey);
    }
}
